package cn.edu.ctbu.test.dao;

import cn.edu.ctbu.test.domain.Sc;
import cn.edu.ctbu.test.domain.Sc;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ScRepository extends JpaRepository<Sc,Long> {

    @Query("select t from sc t where t.studentName = ?1")
    List<Sc> findScByStudentName(String name);


    List<Sc> findAll(Specification<Sc> scSpecification);
    Page<Sc> findAll(Specification<Sc> scSpecification, Pageable pageable);

    Integer count(Specification<Sc> scSpecification);



}
